package com.xkcoding.orm.mybatis.plus.generator.controller.Info;

import org.springframework.web.bind.annotation.*;
import org.springframework.stereotype.Controller;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import com.xkcoding.orm.mybatis.plus.generator.service.Info.IdInfoService;
import com.xkcoding.orm.mybatis.plus.generator.entity.Info.IdInfo;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author Allen
 * @since 2024-10-08
 */
@Controller
@RequestMapping("/id-info")
public class IdInfoAction {


    @Autowired
    private IdInfoService idInfoService;


    @GetMapping(value = "/{id}")
    public ResponseEntity<IdInfo> getById(@PathVariable("id") String id) {
        return new ResponseEntity<>(idInfoService.getById(id), HttpStatus.OK);
    }



}
